package com.pkk.spring.cloud.starter.gateway.route;

import org.springframework.cloud.gateway.route.RouteDefinition;
import org.springframework.cloud.gateway.route.RouteDefinitionRepository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * redis动态路由配置-持久化操作
 * <p>
 * <p>
 * 默认持久实现是InMemoryRouteDefinitionRepository,当我们实现RouteDefinitionRepository时,则依我们实现的为准
 *
 * @author peikunkun
 * @version V1.0
 * @date 2021-01-15 16:59
 **/
public class InRedisRouteDefinitionRepository implements RouteDefinitionRepository {

  /**
   * 获取路由定义信息
   *
   * @return reactor.core.publisher.Flux<org.springframework.cloud.gateway.route.RouteDefinition>
   * @Param
   * @author peikunkun
   * @date 2021/1/15 0015 下午 5:01
   * @since
   */
  @Override
  public Flux<RouteDefinition> getRouteDefinitions() {
    return null;
  }

  /**
   * 保存路由信息
   *
   * @return reactor.core.publisher.Mono<java.lang.Void>
   * @Param route
   * @author peikunkun
   * @date 2021/1/15 0015 下午 5:01
   * @since
   */
  @Override
  public Mono<Void> save(Mono<RouteDefinition> route) {
    return null;
  }

  /**
   * 删除路由信息
   *
   * @return reactor.core.publisher.Mono<java.lang.Void>
   * @Param routeId
   * @author peikunkun
   * @date 2021/1/15 0015 下午 5:02
   * @since
   */
  @Override
  public Mono<Void> delete(Mono<String> routeId) {
    return null;
  }
}
